            <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h3 class="modal-title">PAGO DE <?php echo strtoupper($usuario['User']['nombre_completo']);?></h3>
            </div>
            <div class="modal-body">
                <?php if(!empty($mensajem)):?>
                <div class="row">
                    <div class="col-md-12">
                        <label style="color: red;font-weight: bold;"><?php echo $mensajem;?></label>
                    </div>
                </div>
                <?php endif;?>
                <h3><?php echo strtoupper($parametro['Parametro']['nombre'])?></h3>
                <?php echo $this->Form->create('Movimiento',array('action' => 'guarda_pago'));?>
                <div class="row">
                    <div class="col-md-12">
                        Saldo: <?php echo $usuario['User']['saldo'].' Bs'?>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        
                        <div class="table-responsive">
                            <table class="table table-striped table-vcenter">
                                <thead>
                                <th>Fecha</th>
                                <th>Bolivianos</th>
                                <th>Dolares</th>
                                </thead>
                                <tbody>
                                    <?php 
                                    $total_bolivianos = 0.00;
                                    $total_dolares = 0.00;
                                    ?>
                                    <?php $i = 0;?>
                                    <?php foreach ($array as $ar):?>
                                    <?php 
                                    $total_bolivianos += $ar['cuota_bolivianos'];
                                    $total_dolares += $ar['cuota_dolares'];
                                    ?>
                                    <?php echo $this->Form->hidden("Mode.$i.dato",array('value' => $ar['id']))?>
                                    <tr>
                                        <td><?php echo $ar['fecha']?></td>
                                        <td><?php echo $ar['cuota_bolivianos']?></td>
                                        <td><?php echo $ar['cuota_dolares']?></td>
                                    </tr>
                                    <?php $i++;?>
                                    <?php endforeach;?>
                                    <?php foreach ($extarray as $ar):?>
                                    <?php 
                                    $total_bolivianos += $ar['cuota_bolivianos'];
                                    $total_dolares += $ar['cuota_dolares'];
                                    ?>
                                    <?php echo $this->Form->hidden("Mode.$i.user_id",array('value' => $usuario['User']['id']))?>
                                    <?php echo $this->Form->hidden("Mode.$i.fecha_cuota",array('value' => $ar['fecha']))?>
                                    <?php echo $this->Form->hidden("Mode.$i.cuota",array('value' => $ar['cuota']))?>
                                    <?php echo $this->Form->hidden("Mode.$i.moneda",array('value' => $ar['moneda']))?>
                                    <?php echo $this->Form->hidden("Mode.$i.parametro_id",array('value' => $ar['parametro_id']))?>
                                    <tr style="color: green;">
                                        <td><?php echo $ar['fecha']?></td>
                                        <td><?php echo $ar['cuota_bolivianos']?></td>
                                        <td><?php echo $ar['cuota_dolares']?></td>
                                    </tr>
                                    <?php $i++;?>
                                    <?php endforeach;?>
                                    <tr class="success">
                                        <td><b style="color: black;">TOTAL</b></td>
                                        <td><?php echo $total_bolivianos;?></td>
                                        <td><?php echo $total_dolares;?></td>
                                    </tr>
                                    <?php if($moneda == 'Bolivianos'):?>
                                    <?php echo $this->Form->hidden('Recibo.total',array('value' => $total_bolivianos));?>
                                    <?php elseif ($moneda == 'Dolares'):?>
                                    <?php echo $this->Form->hidden('Recibo.total',array('value' => $total_dolares));?>
                                    <?php endif;?>
                                    <?php echo $this->Form->hidden('Recibo.moneda',array('value' => $moneda));?>
                                    <?php echo $this->Form->hidden('Recibo.t_cambio',array('value' => $tcambio));?>
                                    <tr class="danger">
                                        <td><b style="color: black;">Restante</b></td>
                                        <td><?php echo $bolivianos;?></td>
                                        <td><?php echo $dolares;?></td>
                                    </tr>
                                    <?php //echo $this->Form->hidden('Recibo.saldo',array('value' => $bolivianos));?>
                                    <tr>
                                        <td><b style="color: black;">Guardar Restante</b></td>
                                        <td><?php echo $this->Form->checkbox('guarda',array('class' => 'form-control'));?></td>
                                        <td><?php echo $this->Form->hidden('queda_b' ,array('value' => $bolivianos))?></td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="control-label col-md-4">Pago en:</label>
                            <div class="col-md-8">
                                <label class="radio-inline col-md-5" for="example-inline-radio1">
                                    <input type="radio" id="xradiopago1" name="data[Recibo][tipo]" value="Efectivo" required="required" /> Efectivo
                                </label>
                                <label class="radio-inline col-md-5" for="example-inline-radio2">
                                <input type="radio" id="xradiopago2" name="data[Recibo][tipo]" value="Cheque" required="required"/> Cheque
                                </label>
                            </div>
                           
                        </div>
                    </div>
                </div>
                <script>
                $('#xradiopago2').click(function(){
                    $('#xdatospago').show(100);
                    $('#xidnumero_pago').attr('required','true');
                    $('#xidbanco_pago').attr('required','true');
                });
                $('#xradiopago1').click(function(){
                    $('#xdatospago').hide(100);
                    $('#xidnumero_pago').removeAttr('required');
                    $('#xidbanco_pago').removeAttr('required');
                });
                </script>
                <div id="xdatospago" class="row" style="display: none;">
                    <div class="col-md-6">
                        <h5>Numero</h5>
                        <?php echo $this->Form->text('Recibo.num_cheque',array('id' => 'xidnumero_pago','class' => 'form-control','placeholder' => 'Ingrese el numero de cheque'));?>
                    </div>
                    <div class="col-md-6">
                        <h5>Banco</h5>
                        <?php echo $this->Form->text('Recibo.banco_cheque',array('id' => 'xidbanco_pago','class' => 'form-control','placeholder' => 'Ingrese el Banco'));?>
                    </div>
                </div>
                <br>
                <?php //echo $this->Form->hidden('array',array('value' => $array))?>
                <div class="row">
                    <div class="col-md-6">
                        <a href="javascript:" onclick="cargamodal('<?php echo $this->Html->url(array('action' => 'ajax_pago',$usuario['User']['id']));?>')" class="btn btn-alt btn-warning col-md-12">Regresar</a>
                    </div>
                    <div class="col-md-6">
                        <?php echo $this->Form->hidden('Recibo.categoria_id' ,array('value' => $usuario['User']['categoria_id']));?>
                        <?php echo $this->Form->hidden('Recibo.user_id' ,array('value' => $usuario['User']['id']));?>
                        <?php echo $this->Form->hidden('Recibo.personal_id' ,array('value' => $this->Session->read('Auth.User.id')));?>
                        <?php echo $this->Form->submit('Pagar',array('class' => 'btn btn-alt btn-primary col-md-12'));?>
                    </div>
                </div>
                <?php echo $this->Form->end();?>
            </div>